package com.itheima.set;

import com.itheima.domain.Student;

import java.util.TreeSet;

public class Demo03 {

    public static void main(String[] args) {
        Student cai = new Student("蔡徐坤", 26);
        Student wu = new Student("吴亦凡", 31);
        Student huang = new Student("黄子韬", 28);
        Student lu = new Student("鹿晗", 30);
        TreeSet<Student> set = new TreeSet<>();
        set.add(cai);
        set.add(wu);
        set.add(huang);
        set.add(lu);
        System.out.println(set);


    }
}
